package com.atguigu.spzx.order;

import com.atguigu.spzx.common.anno.EnableSpzxUserInfo;
import com.atguigu.spzx.common.config.SpzxAuthWhiteUrls;
import com.atguigu.spzx.common.interceptor.SpzxLoginAuthInterceptor;
import com.atguigu.spzx.common.interceptor.SpzxWebMvcConfigurer;
import feign.Logger;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication(exclude = {
        SpzxWebMvcConfigurer.class,
        SpzxAuthWhiteUrls.class,
        SpzxLoginAuthInterceptor.class

})
@MapperScan(basePackages = "com.atguigu.spzx.*.mapper")
@EnableFeignClients(basePackages = "com.atguigu.spzx")
@ComponentScan(basePackages = {"com.atguigu.spzx.order",
"com.atguigu.spzx.cart" ,"com.atguigu.spzx.product" ,"com.atguigu.spzx.user" })
@EnableSpzxUserInfo //透传登录状态的拦截器
public class SpzxOrderApplication {
    public static void main(String[] args) {
        SpringApplication.run(SpzxOrderApplication.class , args);
    }
    //feign输出日志多少的配置：full输出远程调用的完整日志
    @Bean
    public Logger.Level level(){
        return Logger.Level.FULL;
    }
}
